/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gra.GUI;


import gra.Renderer.KameraFPP;
import gra.Renderer.Renderer;
import hex.Hex;
import java.awt.Color;
import java.awt.Font;
import java.text.DecimalFormat;
import static org.lwjgl.opengl.GL11.*;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.UnicodeFont;
import org.newdawn.slick.font.effects.ColorEffect;
/**
 *
 * @author Grog
 */
public class GUI {
    
    private static UnicodeFont font;
    private  static  DecimalFormat formater = new  DecimalFormat("#.##");
   
    Renderer renderer;
    
    public GUI(Renderer renderer) {
        this.renderer = renderer;
        ustawFont();
    }
    
    
    
    
    public void wyswietlGUI(){
            glMatrixMode(GL_PROJECTION);
            glLoadMatrix(Renderer.orthograficProjectionMatrix);
            glMatrixMode(GL_MODELVIEW);
            glPushMatrix();
            glLoadIdentity();
            glDisable(GL_LIGHTING);
    
            
           ustawMenu();
            
            
            glEnable(GL_LIGHTING);     
            glPopMatrix();
            glMatrixMode(GL_PROJECTION);
            glLoadMatrix(Renderer.perspectiveProjectionMatrix);
            glMatrixMode(GL_MODELVIEW);
    }
    
    public static void ustawFont(){
        
        System.out.println("ustawiam czcionke");
        java.awt.Font awtFont = new Font("Times New Roman", java.awt.Font.BOLD, 18);
        font = new UnicodeFont(awtFont);
        font.getEffects().add(new ColorEffect(java.awt.Color.white));
        font.addAsciiGlyphs();
        
        try {
            font.loadGlyphs();
        } catch (SlickException ex) {
           ex.printStackTrace();
           
        } 
        System.out.println("czcionka zaladowana");
    }
    
    public static void ustawMenu(){
    
       
        
      
       
    }
    
   
    
}
